classdef Fluor_dev < Processor_dev
  % Class for calculating fluorescence ala SBE Data Procesing
  % Derived from Processor_dev
  % Constructor signature: Fl = Fluor_dev(data, conn), args. optional
  %
  % Author: David Goldsmith, Wash. State Dept. of Ecology, dgol461@ecy.wa.gov
  % Release date: N/A
  
    properties
      % inherited from Processor_dev
%         inData;
%         castDT;
%         scanRate;
%         ParamID;
%         ParamDesc;
%         SBEprec;
%         EquipID;
        DBdata;
        outData;
    end
    
    methods
        function Fl = Fluor_dev(data, conn) % Constructor
            if nargin < 1, data = []; end
            if nargin < 2, conn = []; end
            Fl = Fl@Processor_dev(data);
            if ~isempty(conn), Fl.getDBdata(conn, 'F'); end
            if ~isempty(conn) && ~isempty(data), Fl.mainFormula(); end
        end
        
        function delete(obj) % Destructor
            % Here in case I need it
        end
        
        function mainFormula(obj)
            SF = obj.inData.Sensors.FluoroWetlabECO_AFL_FL_Sensor.ScaleFactor;%SF;
            Vb = obj.inData.Sensors.FluoroWetlabECO_AFL_FL_Sensor.Vblank;%Vb
            tmp = obj.inData.rV(:,obj.inData.Sensors. ...
                                  FluoroWetlabECO_AFL_FL_Sensor.index-2);
            obj.outData = SF * (tmp - Vb);
        end
        
    end
    
end